﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using University.Workshop.Business;

namespace University.Workshop.Presenters
{
    public class InvoicePresenter : BasePresenter<IInvoiceView>
    {
        public InvoicePresenter(IInvoiceView view)
            : base(view)
        {

        }
        public void PrintInvoice()
        {
            try
            {
                InvoiceManager.ValidateInvoice(View.Number, View.FullName, View.CI, View.DateInvoice, View.Detail);
            }
            catch (ArgumentException ar)
            {
                View.MessageWarnings = ar.Message;
            }
        }
    }
}
